<%-- 
  -- Body List para Discount.
  --
  -- @author nicolas.gonzalez
--%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/displaytag-el.tld" prefix="display" %>
<%@ taglib uri="/WEB-INF/security.tld" prefix="security" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%-- Librerias para EXT library --%>
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/script/ext-1.1.1/resources/css/ext-all.css'/>" />
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/script/ext-1.1.1/resources/css/xtheme-default.css'/>" />

<script src="<html:rewrite page='/protected/script/ext-1.1.1/adapter/ext/ext-base.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/ext-1.1.1/ext-all.js'/>" type="text/javascript"></script>

<%-- El ID del form NO debe ser modificado. Se usa desde el menu --%>
<html:form action="/protected/listDiscounts.do" styleId="discountFormId">
    
    <h2>Descuentos</h2>

    <bean:define id="discounts" name="discountForm" property="discounts" />
    <display:table name="pageScope.discounts" sort="list" export="true" pagesize="15" requestURI="/protected/listDiscounts.do" id="row" class="displayTable">
        <display:column title="Descripcion" property="description" sortable="true" />
        <display:column title="Porcentaje" property="percentage" sortable="true" />
        <display:column title="Valor" property="value" sortable="true" />
        <display:column title="Valido desde" property="validFrom" sortable="true" format="{0,date,dd/MM/yyyy}"/>
        <display:column title="Valido hasta" property="validTo" sortable="true" format="{0,date,dd/MM/yyyy}"/>
    </display:table>    

</html:form>
